<%@page contentType="text/html;charset=UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<head>
<title>设备管理</title>
<meta name="menu" content="assetMenu" />
<meta name="nav" content="1" />
<meta name="acc" content="0-1" />
<script>
		$(document).ready(function() {
		 $("input[id='buyTimeBefore']").addClass("Wate").bind("click", function(){
    	 WdatePicker({skin:'whyGreen',minDate:'1900-10-01',maxDate:'#F{$dp.$D(\'buyTimeEnd\')||\'%y-%M-%d\'}',dateFmt:'yyyy-MM-dd'});});
		 $("input[id='buyTimeEnd']").addClass("Wate").bind("focus", function(){
    	 WdatePicker({skin:'whyGreen',minDate:'#F{$dp.$D(\'buyTimeBefore\')}',maxDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'});});
		
		 $("#importdata").click(function(){
			 var url = "${ctx}/asset/equipment/information_import.action";
			 openWindowAsDialog(url);
		 });
		});

		function maintenanceShow(equipId){
			var url = "${ctx}/asset/equipment/maintenance.action?equipId="+encodeURIComponent(equipId);
			showDialogWindow(url);
		}
		function checkShow(equipId){
			var url = "${ctx}/asset/equipment/check.action?equipId="+encodeURIComponent(equipId);
			showDialogWindow(url);		
		  }
	</script>
</head>
<body>
<div id="heading" class="equipment"><h6>设备列表</h6></div>
<div id="message"><s:actionmessage theme="custom"
	cssClass="success" /></div>
<form id="mainForm" action="${ctx }/asset/equipment/information.action" method="get" class="yform">
<div id="filter">
<ul>
<li>设备名称 ：<input type="text" name="filter_LIKES_equipmentModel" value="${param['filter_LIKES_equipmentModel']}" /></li>
<li>责任人：<input type="text" name="filter_LIKES_officer" value="${param['filter_LIKES_officer']}" /></li>
<li>部门：
<pt:labels type="insideOrgDept" name="filter_LIKES_department.id" prompt="全部" default="${param['filter_LIKES_department.id']}"></pt:labels>
</li>
<li>状态：
<pt:code category="2019" name="filter_LIKES_asstState" default="${param['filter_LIKES_asstState']}"></pt:code>
</li>
</ul>
<div class="type-button"><input type="button" value="查询" onclick="search();" class="search"/></div>
</div>
<div id="content">
<table id="contentTable">
	<tr>
		<th><a id="createDate" href="javascript:sort('createDate','asc')">编号</a></th>
		<th><a id="equipmentNo" href="javascript:sort('equipmentNo','asc')">设备编号</a></th>
		<th><a id="equipmentModel" href="javascript:sort('equipmentModel','asc')">设备名称</a></th>
		<th><a id="dataAcquisitionWorkstation" href="javascript:sort('asstState','asc')">状态</a></th>
		<th><a id="department.depName" href="javascript:sort('department.depName','asc')">部门</a></th>
		<th><a id="department.depName" href="javascript:sort('officer','asc')">责任人 </a></th>
		<th>操作</th>
	</tr>
	<c:forEach items="${page.result}" var="equip">
		<tr>
			<td>${equip.sindex }</td>
			<td>${equip.equipmentModel}</td>
			<td>${equip.equipmentNo}</td>
			<td><pt:code category="2019" code="${equip.asstState}"></pt:code> </td>
			<td>${equip.department.depName}</td>
			<td>${equip.officer}</td>
			<td><a
				href="${ctx}/asset/equipment/information!input.action?id=${equip.id}">编辑</a>
			<a
				href="${ctx}/asset/equipment/information!delete.action?id=${equip.id}" onclick="return confirmDelete();">删除</a>
			<input type="button" value="检定" onclick="checkShow('${equip.id}');" />
			<input type="button" value="维修"
				onclick="maintenanceShow('${equip.id}');" /></td>
		</tr>
	</c:forEach>
</table>
</div>
<jsp:include page="/common/page.jsp" flush="true" />
<div class="type-button">
<input  type="button" class="button"  id="importdata"  value="导入" />
<input onclick="location.href='${ctx}/asset/equipment/information!input.action'" type="button" class="submit" value="新增" /></div>
</form>
</body>

